"""
URL configuration for myWeb project.

The `urlpatterns` list routes URLs to backend_views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function backend_views
    1. Add an import:  from my_app import backend_views
    2. Add a URL to urlpatterns:  path('', backend_views.home, name='home')
Class-based backend_views
    1. Add an import:  from other_app.backend_views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.views.generic import TemplateView
from .settings import MEDIA_URL, MEDIA_ROOT  # 导入MEDIA_URL, MEDIA_ROOT
from django.conf.urls.static import static  # 导入静态资源

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include('backend.urls')),
    path('api/', include('backend.views.videoLike.urls')),
    path('', TemplateView.as_view(template_name='index.html')),
] + static(MEDIA_URL, document_root=MEDIA_ROOT)
